package com.chenyue.cm.exception;


import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 封装RuntimeException
 *
 * @author libingxing
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class SysRuntimeException extends RuntimeException {
	private static final long serialVersionUID = 1L;
	
	private String msg;

	private int code = 500;
	
	public SysRuntimeException(){
	}

	public SysRuntimeException(String msg) {
		super(msg);
		this.msg = msg;
	}

	public SysRuntimeException(String msg, Throwable e) {
		super(msg, e);
		this.msg = msg;
	}

	public SysRuntimeException(String msg, int code) {
		super(msg);
		this.msg = msg;
		this.code = code;
	}

	public SysRuntimeException(String msg, int code, Throwable e) {
		super(msg, e);
		this.msg = msg;
		this.code = code;
	}

}
